package com.example.demo.Controller;

import com.example.demo.Service.JedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/jedis")
public class JedisTestController {
    @Autowired
    private JedisService jedisService;

    @GetMapping("/{name}")
    public String get(@PathVariable("name") String name){
        return "value:"+jedisService.get(name);
    }

    @PutMapping("/")
    public String put(){
        jedisService.put();
        return "success";
    }

}
